“I need to use Emacs and I’m in a hurry.”

Emacs Editor

 

Emacs is one of those classic Linux tools that feels like you can keep learning it forever.

Compact, extensible, and crammed with features, Emacs lets you grow into it over time.

 

Your first time using Emacs should be an self-paced, educational session. Unfortunately, a lot of first-time users find themselves diving into Emacs unexpectedly. Maybe you need to take over a project in an unfamiliar Linux environment, or you’re working on an assignment in college that requires you to use Emacs for full points. Whatever the situation, if you don’t have time to learn things right, you probably need to learn things right now, enough to get it done. Naturally, you should always come back later and learn it the right way — but let’s take on thing at a time.

 

First, let’s set out a very, very concise version of how to use Emacs. Basic operational commands and that’s about it. Read this one if you’re extremely hurried or extremely lazy. Somewhat less ridiculously concise version will follow.

 

Very, very concise version

Arrow keys move around.

Depending on your system, scrolling / clicking may also work.

 

Move to a line: esc-g, then enter a line number and press enter.

 

Search for text: ctrl-s, enter text, press ctrl-s repeatedly to cycle through.

 

Save: ctrl-x ctrl-s

 

Exit: ctrl-x ctrl-c

 

Merely very concise version

May contain duplicates from above.

 

In Emacs, the character ‘C’ stands for what is by default on most computers the control key, ‘M’ stands for the alt key, and ‘Esc’ stands for the escape key. Emacs is modifiable, so this is implementation-dependent, but for the typical install, you can expect this mapping to hold true.

 

General commands

Save C-x C-s
Undo C-/
Exit a command that you’ve started entering C-g
Exit the Emacs session C-x C-c

 

Navigating the document

Move around the text arrow keys
Move down one screen’s worth of text C-v
Move up one screen’s worth of text M-v or Esc-v
Vertically center the screen around the cursor C-l
Move to the beginning of the line C-a
Move to the end of the line C-e
Go to line Esc-g
Search for text C-s

 

Moving text around

Remove the current line, from the cursor forward C-k
Start selecting text C-space
Remove selected text C-w
Copy selected text Esc-w
Paste text C-y

 


 

By the way, when you do go back to learn more about Emacs (you will go back, won’t you?), check out the Emacs Wiki guide to learning Emacs, which is jam-packed with resources.